package com.weitao.marketserver.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * 随机订单号生成器
 */
public class TradeNoGen {

    public static String getNewTradeNo() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        Random random = new Random();
        String result = simpleDateFormat.format(new Date()) + (random.nextInt(899999) + 100000);
        return result;
    }
}
